package p2p

import (
	libcore "github.com/tokentransfer/interfaces/core"
)

type MessageCallback func(from string, msgData []byte) error

type P2PService interface {
	Start(c libcore.Config, m map[string]MessageCallback) error
	Stop() error

	SendMessage(chainId string, node string, msgFlag string, netMsg []byte) error
	ListPeers(chainId string) ([]string, error)
	VerifyPeers(chainId string) error
}
